﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace Streambolics
{
    /// <summary>
    ///     Information about the current Windows User.
    /// </summary>
    public static class WindowsUser
    {
        private static WindowsPrincipal _Principal = new WindowsPrincipal (WindowsIdentity.GetCurrent ());
        private static bool _AdministrativeRight = _Principal.IsInRole (WindowsBuiltInRole.Administrator);

        /// <summary>
        ///     Whether the user has administrator privileges.
        /// </summary>

        public static bool HasAdministrativeRights
        {
            get
            {
                return _AdministrativeRight;
            }
        }
    }
}
